import request from '@/utils/request'

// 部门列表
export function getDepartmentList(data) {
  return request({
    url: '/api/department_list',
    method: 'POST',
    data,
  })
}

// 添加部门
export function addDepartment(data) {
  return request({
    url: '/api/department_add',
    method: 'POST',
    data,
  })
}

// 删除部门
export function delDepartment(id) {
  return request({
    url: '/api/department_del?id=' + id,
    method: 'POST',
  })
}

// 查询机构子级
export function getDeptList(pid) {
  return request({
    url: '/api/get_dept_list?pid=' + pid,
    method: 'POST',
  })
}

// 查询全部部门
export function getDeptLists() {
  return request({
    url: '/api/get_dept_list',
    method: 'POST',
  })
}
